package Day04;

import java.util.Random;

public class Test01 {
    public static void main(String[] args) {
        Random r=new Random();
        int[] arr=new int[6];
        int he=0;
        for (int i = 0; i < arr.length; i++) {
            int num=r.nextInt(100);
            arr[i]=num;
            he+=num;
            System.out.print(arr[i]+" ");
        }
        System.out.println("六个随机数的和是"+he);
    }

}
